package com.powernode.ssm.controller;

import com.powernode.ssm.pojo.vo.LoginVo;
import com.powernode.ssm.pojo.vo.QueryEmpVo;
import com.powernode.ssm.service.LoginService;
import com.powernode.ssm.utils.ResponseUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@Api(
        value ="登录管理",
        tags = {"登录管理"})

@RestController
@RequestMapping("/login")
public class LoginController {

    @Autowired
    LoginService loginService;

    @ApiOperation("登录")
    @RequestMapping(value = "/B109811",method = RequestMethod.POST)
    public ResponseUtils queryEmp(HttpServletRequest request, @Validated @RequestBody LoginVo loginVo){
        return loginService.login(request,loginVo);
    }

}
